from myelin.Ns import MYELIN, FOAF, DC, DCTERMS

from myelin.rdf.bindery.Model import ModelTypeO, ModelTypeS
from myelin.rdf.bindery.ObjectTypes import LiteralTypeO

from Resource import Resource
from Document import Document

#import Agent

from ObjectTypes import \
    AgentProfileTypeO, AgentProfileTypeS, \
    AgentTypeO, \
    AgentDepictionTypeO, AgentDepictionTypeS

from mappings import \
    AgentProfileMap, \
    AgentDepictionMap


class AgentDepiction(Resource):
    
    ModelTypes = (AgentDepictionTypeO, AgentDepictionTypeS)
    
    RDF_BINDINGS = {
        'dcFormat'              : ((DC, 'format'), LiteralTypeO, AgentDepictionMap),
        'dctermsModified'       : ((DCTERMS, 'modified'), LiteralTypeO, AgentDepictionMap),
    }
    

class AgentProfile(Document):
    
    ModelTypes = (AgentProfileTypeO, AgentProfileTypeS)
    
    RDF_BINDINGS = {
        'foafPrimaryTopic'      : ((FOAF, 'primaryTopic'), AgentTypeO, AgentProfileMap),
        'foafDepiction'         : ((FOAF, 'depiction'), AgentDepictionTypeO, AgentProfileMap),
    }

    
CLASS_TYPES = {
    MYELIN + 'AgentProfile'     : AgentProfile,
    MYELIN + 'AgentDepiction'   : AgentDepiction,
}